package com.vil.mapper;

import java.util.List;

import com.vil.entity.Admin;
import com.vil.entity.HouseProperty;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface HousePropertyMapper {
    int deleteByPrimaryKey(Long id);

    int insert(HouseProperty record);

    int insertSelective(HouseProperty record);

    HouseProperty selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(HouseProperty record);

    int updateByPrimaryKey(HouseProperty record);
    
    //判断房产是否存在
    @Select("select count(1) from house_property where property_name = #{property_name}")
    int isExist(@Param("property_name")String property_name);

    List<HouseProperty> getListByManyConditions(HouseProperty houseProperty);

    List<HouseProperty> getListByManyCondition(String property_name);

    //批量删除
    int deleteMany(Long[] array);


}